<template>
	<view>
		<swiper class="ad-swiper" circular indicator-dots="true" autoplay="true" interval="4000"
				duration="500">
			<swiper-item v-for="item in adListData" :key="item.url">
				<view class="ad-image-view">
					<!-- 广告图片 -->
					<image class="ad-image" mode="scaleToFill" :src="item.url"></image>
				</view>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		props: {
			adListData: {
				type: Array,
				default: [{
					url: '/static/partener.jpg'
				}]
			}
		},
		data() {
			return {
			}
		}
	}
</script>

<style scoped lang="scss">
	.ad-swiper {
		width: 750rpx;
		height: 400rpx;
		// background-image: url('/static/ad-bg.jpg');
		// background-size: cover;
		// background-attachment: fixed;
		// background-position: center;
		// background-repeat: no-repeat;
		
		.ad-image-view {
			width: 710rpx;
			height: 380rpx;
			padding: 20rpx 20rpx 0rpx 20rpx;
			
			.ad-image {
				width: 100%;
				height: 100%;
				border-radius: 20rpx;
			}
		}
	}
	
</style>